package net.lab1024.sa.admin.module.system.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.lab1024.sa.admin.module.system.user.domain.Enity.UserEntity;
import net.lab1024.sa.admin.module.system.user.domain.UserVO;
import net.lab1024.sa.admin.module.system.user.domain.form.UserQueryForm;
import net.lab1024.sa.admin.module.system.user.domain.form.UserUpdateForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface UserDao extends BaseMapper<UserEntity> {

    List<UserVO> queryByPage(Page page, @Param("query") UserQueryForm queryForm);
    List<UserEntity> selectByName(String Name);

    UserEntity selectById(String userId);
    UserEntity deleteById(String userId);

    UserEntity getByPhone(String phone);

    UserEntity selectByUserId(String userId);

    void updateByUserEntity(@Param("userEntity")UserEntity userEntity);
}
